package com.mmy.fta.trade.server.service;


import com.mmy.fta.cargo.api.model.CargoInfoDTO;
import com.mmy.fta.trade.server.dto.CanceledOrderDTO;
import com.mmy.fta.trade.server.dto.CompletedOrderDTO;
import com.mmy.fta.trade.server.dto.TransportOrderDTO;
import com.mmy.fta.trade.server.request.AgreeOrderRequest;
import com.mmy.fta.trade.server.request.CancelOrderRequest;
import com.mmy.fta.trade.server.request.CanceledOrderRequest;
import com.mmy.fta.trade.server.request.ColdTruckRequest;
import com.mmy.fta.trade.server.request.CompletedOrderRequest;
import com.mmy.fta.trade.server.response.ColdTruckResponse;
import com.mmy.fta.trade.server.response.CreatOrderResponse;
import com.mmy.fta.trade.server.request.LoadOrderRequest;
import com.mmy.fta.trade.server.request.ReceiveOrderRequest;
import com.mmy.fta.trade.server.request.RefuseOrderRequest;
import com.mmy.fta.trade.server.request.RepublishCargoRequest;
import com.mmy.fta.trade.server.request.TransportOrderRequest;
import com.mmy.fta.trade.server.request.PreCreatOrderRequest;
import com.mmy.fta.trade.server.request.UnloadOrderRequest;
import com.mmy.fta.trade.server.request.CreatOrderRequest;
import com.mmy.fta.trade.server.response.PreCreatOrderResponse;

import java.io.IOException;
import java.util.List;

/**
 * @author qiang.lin
 * @since 2021/10/22
 */
public interface OrderService {
    public PreCreatOrderResponse preCreateOrder(PreCreatOrderRequest preCreatOrderRequest);

    public CreatOrderResponse createTransportOrderByDriver(CreatOrderRequest creatOrderRequest);

    public List<TransportOrderDTO> queryTransportOrdersByDriver(TransportOrderRequest orderInTransportRequest);

    public List<TransportOrderDTO> queryTransportOrdersByShipper(TransportOrderRequest orderInTransportRequest);

    List<CanceledOrderDTO> getCanceledOrdersByDriver(CanceledOrderRequest canceledOrderRequest);

    List<CanceledOrderDTO> getCanceledOrdersByShipper(CanceledOrderRequest canceledOrderRequest);

    List<CompletedOrderDTO> getCompletedOrdersByDriver(CompletedOrderRequest completedOrderRequest);

    List<CompletedOrderDTO> getCompletedOrdersByShipper(CompletedOrderRequest completedOrderRequest);



    List<TransportOrderDTO> agreeOrderByShipper(AgreeOrderRequest agreeOrderRequest) throws IOException;

    List<CanceledOrderDTO> refuseOrderByShipper(RefuseOrderRequest refuseOrderRequest) throws IOException;

    List<CanceledOrderDTO> cancelOrderByShipper(CancelOrderRequest cancelOrderRequest) throws IOException;

    int receiveOrderByShipper(ReceiveOrderRequest receiveOrderRequest) throws IOException;



    List<CanceledOrderDTO> cancelOrderByDriver(CancelOrderRequest cancelOrderRequest) throws IOException;

    List<TransportOrderDTO> loadOrderByDriver(LoadOrderRequest loadOrderRequest) throws IOException;

    List<TransportOrderDTO> unloadOrderByDriver(UnloadOrderRequest unloadOrderRequest) throws IOException;

    CargoInfoDTO republishCargo(RepublishCargoRequest republishCargoRequest);

    ColdTruckResponse getColdTruckDataByShipper(ColdTruckRequest coldTruckRequest);
}
